
package com.sausageking.shared;

import javax.persistence.Id;

import com.google.appengine.api.datastore.Blob;

// TODO(haibozhao): merge Deal.java with Offer.java.

public class Deal {

  @Id
  private Long id;

  private String MerchantName;

  private String offerDescription;

  private String address;

  private String offerType;

  private Blob image;

  public String getMerchantName() {
    return MerchantName;
  }

  public Deal setMerchantName(String merchantName) {
    MerchantName = merchantName;
    return this;
  }

  public String getOfferDescription() {
    return offerDescription;
  }

  public Deal setOfferDescription(String offerDescription) {
    this.offerDescription = offerDescription;
    return this;
  }

  public String getAddress() {
    return address;
  }

  public Deal setAddress(String address) {
    this.address = address;
    return this;
  }

  public String getOfferType() {
    return offerType;
  }

  public Deal setOfferType(String offerType) {
    this.offerType = offerType;
    return this;
  }

  public byte[] getImage() {
    if (image == null) {
      return null;
    }
    return image.getBytes();
  }

  public Deal setImage(byte[] bytes) {
    this.image = new Blob(bytes);
    return this;
  }
}
